package ltd.hxya.novel.admin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import ltd.hxya.novel.admin.entity.OperationRole;
import ltd.hxya.novel.admin.mapper.OperationRoleMapper;
import ltd.hxya.novel.admin.service.OperationRoleService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OperationRoleServiceImpl extends ServiceImpl<OperationRoleMapper, OperationRole> implements OperationRoleService {

    // 根据角色id，查询出菜单List
    @Override
    public List<OperationRole> getOperationList(Integer roleId) {
        QueryWrapper<OperationRole> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("role_id",roleId);
        List<OperationRole> userOperations = this.baseMapper.selectList(queryWrapper);
        return userOperations;
    }
}
